package com.paper.tiger.easy.rpc.center;

import com.paper.tiger.easy.rpc.core.GeneralHandleData;
import com.paper.tiger.easy.rpc.core.ServerType;

/**
 * [简要描述]: 处理查询服务请求
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/5/31 09:16
 * @since JDK 1.8
 */
public class SelectService implements BasicService
{


    @Override
    public GeneralHandleData service(GeneralHandleData generalHandleData)
    {
        System.out.println("------------------接收到查询请求-----------------------");
        GeneralHandleData data = new GeneralHandleData();

        data.setResult(true);
        data.setType(ServerType.SELECT_RESPONSE.getCode());
        data.setList(ServerMap.list());

        return data;
    }
}
